; asahci.INF
; Installation INF for ASMEDIA AHCI SATA Controller for Windows VISTA/2008/7
; Copyright (C) 2010 Asmedia Technology

[Version]
Signature="$WINDOWS NT$"
Class=hdc
ClassGUID={4D36E96A-E325-11CE-BFC1-08002BE10318}
Provider=%ASMEDIA%
DriverVer=07/18/2012,1.3.8.000
CatalogFile=asahci64.cat

[Manufacturer]
%ASMEDIA%=ASMEDIA_AHCI,NTamd64

[ASMEDIA_AHCI.NTamd64]
%PCI\VEN_1B21&DEV_0601.DeviceDesc%= asahci_Inst, PCI\VEN_1B21&DEV_0601
%PCI\VEN_1B21&DEV_0602.DeviceDesc%= asahci_Inst, PCI\VEN_1B21&DEV_0602
%PCI\VEN_1B21&DEV_0611.DeviceDesc%= asahci_Inst, PCI\VEN_1B21&DEV_0611
%PCI\VEN_1B21&DEV_0612.DeviceDesc%= asahci_Inst, PCI\VEN_1B21&DEV_0612

[ControlFlags]
ExcludeFromSelect =*

; --------------source
[SourceDisksNames]
1=%SOURCE_DISK%

[SourceDisksFiles]
asahci64.sys = 1
ahcipp64.dll = 1

; --------------dest
[DestinationDirs]
AhciPropPageFile = 11
DefaultDestDir = 12

[asahci_Inst]
CopyFiles = @asahci64.sys, AhciPropPageFile
AddPowerSetting =AhciPowerSetting1,AhciPowerSetting2
AddReg = AhciPropPageReg

[AhciPowerSetting1]
Subgroup = {0012ee47-9041-4b5d-9b77-535fba8b1442}
; LPM: Partial - 10us resume time on IO; Slumber - 10ms resume time on IO
;****** HIPM settings 
Setting =  {0b2d69d7-a2a1-449c-9680-f91c70521c60}, "AHCI Link Power Management - HIPM/DIPM", "Configures the LPM state.",,0x00000001

Value = 0, "Active", "Neither Host or Device initiated allowed", 0x00010001, 0
Value = 1, "HIPM", "Host initiated allowed only", 0x00010001, 1
Value = 2, "HIPM+DIPM", "Both Host and Device initiated allowed", 0x00010001, 3 

; High Performance
Default = {8C5E7FDA-E8BF-4A96-9A85-A6E23A8C635C}, 0, 0
Default = {8C5E7FDA-E8BF-4A96-9A85-A6E23A8C635C}, 1, 1

; Balanced
Default = {381B4222-F694-41F0-9685-FF5BB260DF2E}, 0, 1
Default = {381B4222-F694-41F0-9685-FF5BB260DF2E}, 1, 1

; Power Saving
Default = {A1841308-3541-4FAB-BC81-F71556F20B4A}, 0, 2
Default = {A1841308-3541-4FAB-BC81-F71556F20B4A}, 1, 2

[AhciPowerSetting2]
Subgroup = {0012ee47-9041-4b5d-9b77-535fba8b1442}
; LPM: Partial - 10us resume time on IO; Slumber - 10ms resume time on IO

;****** Partial to Slumber settings (ms)
Setting =  {DAB60367-53FE-4fbc-825E-521D069D2456}, "AHCI Link Power Management - Adaptive", "Automatically transit from Partial to Slumber.",,0x00000001
; range 0 to 5 minutes (unit: ms)
ValueRange = 0, 300000, 1, "millisecond"

; High Performance
Default = {8C5E7FDA-E8BF-4A96-9A85-A6E23A8C635C}, 0, 0
Default = {8C5E7FDA-E8BF-4A96-9A85-A6E23A8C635C}, 1, 0

; Balanced
Default = {381B4222-F694-41F0-9685-FF5BB260DF2E}, 0, 100
Default = {381B4222-F694-41F0-9685-FF5BB260DF2E}, 1, 100

; Power Saving
Default = {A1841308-3541-4FAB-BC81-F71556F20B4A}, 0, 100
Default = {A1841308-3541-4FAB-BC81-F71556F20B4A}, 1, 100

[AhciPropPageFile]
ahcipp64.dll

[asahci_Inst.Services]
AddService = %SERVICE_NAME%, %SPSVCINST_ASSOCSERVICE%, asahci_Service_Inst, asahci_EventLog_Inst

[asahci_Service_Inst]
ServiceType    = %SERVICE_KERNEL_DRIVER%
StartType      = %SERVICE_BOOT_START%
ErrorControl   = %SERVICE_ERROR_NORMAL%
ServiceBinary  = %12%\asahci64.sys
LoadOrderGroup = "SCSI Miniport"
AddReg	       = asahci_Service_Inst.AddReg

[asahci_Service_Inst.AddReg]
HKR, "Parameters\PnpInterface", "5", %REG_DWORD%, 0x00000001

[asahci_Inst.HW]
; Contains AddReg/DelReg sections to manage hardware-specific registry settings
 AddReg	= DDInstall_AddReg_HW_Removal_Policy
[DDInstall_AddReg_HW_Removal_Policy]
HKR,,"RemovalPolicy",0x00010001,3
;where Policy = 2 for ExpectOrderlyRemoval, Policy = 3 for ExpectSurpriseRemoval.
[AhciPropPageReg]
HKR,, EnumPropPages32,, "ahcipp64.dll, AhciPropPageProvider"

[asahci_EventLog_Inst]
AddReg = asahci_EventLog_Inst.AddReg

[asahci_EventLog_Inst.AddReg]
HKR,,EventMessageFile,%REG_EXPAND_SZ%,"%%SystemRoot%%\System32\IoLogMsg.dll" 
HKR,,TypesSupported,%REG_DWORD%,7

; ******** Uninstall section ********
[DefaultUninstall]
DelFiles = @asahci64.sys, AhciPropPageFile

[DefaultUninstall.Services]
DelService = %SERVICE_NAME%

;********************************************************
; Extra Registry Entries

[Strings]
ASMEDIA = "Asmedia Technology"
PCI\VEN_1B21&DEV_0611.DeviceDesc ="Asmedia 106x SATA Controller"
PCI\VEN_1B21&DEV_0612.DeviceDesc ="Asmedia 106x SATA Controller"
PCI\VEN_1B21&DEV_0601.DeviceDesc ="Asmedia 106x SATA Controller"
PCI\VEN_1B21&DEV_0602.DeviceDesc ="Asmedia 106x SATA Controller"
SOURCE_DISK  = "Asmedia 106x SATA Controller"
SERVICE_NAME = "asahci64"

;*******************************************
;Non-localizable, Handy macro substitutions
SPSVCINST_ASSOCSERVICE = 0x00000002
SERVICE_KERNEL_DRIVER  = 1
SERVICE_BOOT_START     = 0
SERVICE_ERROR_NORMAL   = 1
SERVICE_ERROR_CRITICAL = 3
REG_EXPAND_SZ          = 0x00020000
REG_DWORD              = 0x00010001
REG_MULTI_SZ           = 0x00010000
